package top.atluofu.luofuecommerce.cart.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.atluofu.luofuecommerce.cart.interceptor.CartInterceptor;

/**
 * @ClassName: GulimallWebConfig
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2022Year-11Month-24Day-18:56
 * @Version: 1.0
 */
@Configuration
public class LuofuWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).addPathPatterns("/**");
    }
}
